-
Notifications
You must be signed in to change notification settings - Fork 0
Notification Rule Processing Engine #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: notification-rule-baseline
Are you sure you want to change the base?
Notification Rule Processing Engine #6
Conversation
* wip * Add working actions for GMA rules based on Prom-only API * Remove Ruler-loader related code for Grafana rules Co-authored-by: Sonia Augilar <[email protected]> * Remove outdated tests * add some comments * remove commented code * remove showLocation property * Add missing mocks in tests * Add showLocation to GrafanaRuleListItem, improve useAbilities, address PR feedback * Enhance GrafanaGroupLoader tests: Add permission checks and More button functionality - Introduced user permission grants for alerting actions in tests. - Added tests for rendering the More button with action menu options. - Verified that each rule has its own action buttons and handles permissions correctly. - Ensured the edit button is not rendered when user lacks edit permissions. - Confirmed the correct menu actions are displayed when the More button is clicked. * Update translations --------- Co-authored-by: Sonia Aguilar <[email protected]> Co-authored-by: Sonia Augilar <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
Greptile OverviewConfidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant RuleListView
participant GrafanaGroupLoader
participant PrometheusAPI
participant RulerAPI
participant GrafanaRuleListItem
participant RuleActionsButtons
participant AlertRuleMenu
participant useAbilities
Note over RuleListView,useAbilities: New Flow (Post-PR)
User->>RuleListView: View alert rules
RuleListView->>GrafanaGroupLoader: Load group
GrafanaGroupLoader->>PrometheusAPI: useGetGrafanaGroupsQuery()
PrometheusAPI-->>GrafanaGroupLoader: GrafanaPromRuleDTO[]
loop For each rule
GrafanaGroupLoader->>GrafanaRuleListItem: Render rule with promRule only
GrafanaRuleListItem->>RuleActionsButtons: Pass promRule
RuleActionsButtons->>useAbilities: useGrafanaPromRuleAbility(promRule)
useAbilities->>useAbilities: Check folder permissions
useAbilities-->>RuleActionsButtons: [supported, allowed]
RuleActionsButtons->>AlertRuleMenu: Pass promRule
AlertRuleMenu->>useAbilities: useGrafanaPromRuleAbilities(promRule)
useAbilities-->>AlertRuleMenu: Ability[]
AlertRuleMenu-->>GrafanaRuleListItem: Menu with permissions
end
Note over RuleListView,useAbilities: Old Flow (Pre-PR - REMOVED)
Note over GrafanaGroupLoader,RulerAPI: Previously called:<br/>useGetGrafanaRulerGroupQuery()<br/>and matched rules
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
14 files reviewed, no comments
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Test 5
Replicated from ai-code-review-evaluation/grafana-greptile#5